<div class="modal fade in ip-box" tabindex="-1" role="dialog" data-keyboard="false" data-backdrop="static" aria-labelledby="myModalLabel" aria-hidden="true" id="newlyAdded" *ngIf="initService.init">
    <div class="modal-dialog modal-lg-f" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" 
                        class="close" 
                        data-dismiss="modal" 
                        aria-hidden="true"
                        (click)="initService._init()"
                        >×
                </button>
                <h4 class="modal-title" id="myModalLabel">终端管理 — 新增</h4>
            </div>
            <div class="modal-body">
                <form #newlyAddedForm="ngForm" (ngSubmit)="_onSubmit(newlyAddedForm.value)">

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 control-label text-right">终端编码：</label>
                        <div class="col-xs-12 col-sm-9">
                            <input type="text" 
                            	   name="terminalCode" 
                            	   class="form-control"
                                   autocomplete="off" 
                                   maxlength="25"
                            	   required
                                   pattern="^[0-9a-zA-Z_]+$" 
                                   #terminalCode="ngModel"
                                   placeholder="请输入终端编码"
                                   ngModel
                            	   >
                            <label class="red required">*</label>
                            <div class="error" *ngIf="terminalCode.invalid && (terminalCode.touched)">
                                <small class="error" *ngIf="terminalCode.errors.required">终端编码不能为空</small>
                            	<small class="error" *ngIf="terminalCode.errors.pattern">请输入数字或英文字母，允许输入_</small>
                            </div>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-12 col-sm-3 control-label text-right">终端名称：</label>
                        <div class="col-xs-12 col-sm-9">
                            <input type="text" 
                                   name="terminalName" 
                                   class="form-control"
                                   autocomplete="off" 
                                   maxlength="25"
                                   required
                                   #terminalName="ngModel"
                                   placeholder="请输入终端名称"
                                   ngModel
                                   >
                            <label class="red required">*</label>
                            <div class="error" *ngIf="terminalName.invalid && (terminalName.touched)">
                            	<small class="error" *ngIf="terminalName.errors.required">终端名称不能为空</small>
                            </div>
                        </div>
                    </div>

                    <div class="form-group height-auto">
                        <label class="col-xs-12 col-sm-3 control-label text-right">描述：</label>
                        <div class="col-xs-12 col-sm-9">
                            <textarea rows="5" 
                            		  type="text" 
                            		  name="description" 
                                      class="form-control" 
                                      maxlength="100"
                                      placeholder="描述"
                                      ngModel
                            		  >                                    
                            </textarea>
                            
                        </div>
                    </div>

                    <div class="modal-footer modal-footer-tongy">
                        <button type="button" 
                                class="btn btn-fff" 
                                data-dismiss="modal"
                                (click)="initService._init()"
                                >取消
                        </button>
                        <button type="submit" 
                                class="btn btn-primary" 
                                [disabled]="newlyAddedForm.invalid"
                                ><span class="glyphicon glyphicon-plus"></span> 新增
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
